﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Console开放封闭原则
{
    // 在类中，我们将每一个方法都进行接口抽象，比较极端，所以我们要根据业务逻辑来介绍接口的封装
    public class BankProcess02
    {
    }

    public interface IBankProcess {
        void BankProcess();
    }


    public class DepostieClass02 : IBankProcess
    {
        public void BankProcess()
        {
            Console.WriteLine("存钱");
        }
    }

    public class DrawMoneyClass02 : IBankProcess
    {
        public void BankProcess()
        {
            Console.WriteLine("取钱");
        }
    }
    public class TransferClass02 : IBankProcess
    {
        public void BankProcess()
        {
            Console.WriteLine("转账");
        }
    }
}